<div class="heading_page">
	{$app_name} {$app_version}
</div>

<div class="heading_page_sub">
	New Metrics Entry
</div>

<form id="form_metric" name="form_metric" method="post" action="">
	
	<table style="width:10O%;" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td class="detail_label">Name:</td>
			<td class="detail_value">
				{$active_user_first_name} {$active_user_last_name}
			</td>
		</tr>
		<tr>
			<td class="detail_label">Date:</td>
			<td class="detail_value">
				<select id="datestamp" name="datestamp" class="control">
					{$data_form_metric_datestamp_select}
				</select>
			</td>
		</tr>		
	</table>
	
	<br/>
			
	<input id="form_id" name="form_id" type="hidden" value="metric" />
	<input id="active_user_id" name="active_user_id" type="hidden" value="{$active_user_id}" />

	<table style="width:10O%;" cellpadding="0" cellspacing="0" border="0">

		<tr>
			<td class="field_label" colspan="2" style="background-color:#000066;color:#ffffff;height:40px;vertical-align:top;">
					<p id="field_help" name="field_help"></p>			
			</td>
		</tr>
	
	{section name=team_index loop=$list_form_metric_team}
		<tr>
			<td class="field_label" colspan="2" style="background-color:#000033;color:#ffffff;height:20px;vertical-align:top;">
				<p style="font-size:11pt;">{$list_form_metric_team[team_index].description}</p>			
			</td>
		</tr>	
		{section name=prompt_index loop=$list_form_metric_prompt}
			{if $list_form_metric_team[team_index].id == $list_form_metric_prompt[prompt_index].team_id }
				<tr>
					<td class="field_label" style="background-color:{cycle values=#ffffff,#eeeeff advance=false}" onmouseover="set_field_help('{$list_form_metric_prompt[prompt_index].help_text}');" onmouseout="set_field_help('');">
						{$list_form_metric_prompt[prompt_index].label}
					</td>				
					<td class="field_value" style="background-color:{cycle values=#ffffff,#eeeeff}" onmouseover="set_field_help('{$list_form_metric_prompt[prompt_index].help_text}');" onmouseout="set_field_help('');">
						{if $list_form_metric_prompt[prompt_index].type == "integer"}
							<input id="post_{$list_form_metric_prompt[prompt_index].id}" name="post_{$list_form_metric_prompt[prompt_index].id}" class="control" type="text" maxlength="10" size="10" value="0" title="{$list_form_metric_prompt[prompt_index].id}" />							
						{/if}
						{if $form_metrics_prompts[prompts_index].type == "date"}
							<input id="post_{$list_form_metric_prompt[prompt_index].id}" name="post_{$list_form_metric_prompt[prompt_index].id}" class="control" type="text" maxlength="10" size="10" value="" title="{$list_form_metric_prompt[prompt_index].id}" />	
						{/if}
					</td>
				</tr>
			{/if}
		{/section}
	{/section}

		<tr>
			<td colspan="2" class="field_label">
				<input type="submit" name="Submit" value="Save Entry" class="button" onmouseover="set_field_help('Save the current metrics entry');" onmouseout="set_field_help('');"/>			
				<input type="button" name="Cancel" value="Cancel" class="button" onmouseover="set_field_help('Cancel the current metrics entry');" onmouseout="set_field_help('');" onclick="location.href='?action=view&item=home'"/>			
			</td>
		</tr>
		
	</table>
	
</form>

